﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using LetiLib.Device;

namespace LedCenter.GUI
{
    public partial class DeviceSelector : Form
    {
        public DeviceSelector()
        {
            InitializeComponent();
        }

        public List<TCPDevice> listDevices = new List<TCPDevice>();
        public List<TCPDevice> listSelectedDevices = new List<TCPDevice>();
        public void addDevice(TCPDevice dev)
        {
            listDevices.Add(dev);
            listDevicesView.Items.Add(dev.Name);
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem item in listDevicesView.Items)
            {
                if (item.Checked)
                    listSelectedDevices.Add(listDevices[item.Index]);
            }
        }

    }
}
